<!DOCTYPE html>
<html>
<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>后台栏目管理</title>
    <meta name="keywords" content="H+后台主题,后台bootstrap框架,会员中心主题,后台HTML,响应式后台">
    <meta name="description" content="H+是一个完全响应式，基于Bootstrap3最新版本开发的扁平化主题，她采用了主流的左右两栏式布局，使用了Html5+CSS3等现代技术">
    <link rel="shortcut icon" href="favicon.ico">
    <link href="__ADMIN__css/bootstrap.min14ed.css" rel="stylesheet">
    <link href="__ADMIN__css/font-awesome.min93e3.css" rel="stylesheet">
    <link href="__ADMIN__css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="__ADMIN__css/animate.min.css" rel="stylesheet">
    <link href="__ADMIN__css/style.min862f.css" rel="stylesheet">
    <link href="__ADMIN__js/plugins/layer/skin/layer.css" rel="stylesheet">
    <link href="__ADMIN__js/plugins/layer/laypage/skin/laypage.css" rel="stylesheet">

</head>

<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>栏目管理</h5>
                    <div class="ibox-tools">
                    </div>
                </div>
                <div class="ibox-content">
                    <div class="row m-b-sm m-t-sm">
                        <div class="col-md-2">
                            <a href="{:U('columns/add')}" class="btn btn-outline btn-primary">添加栏目</a>
                        </div>
                    </div>

                    <table class="table table-bordered">
                        <thead>
                        <tr>
                            <th>ID</th>
                            <th>父ID</th>
                            <th>栏目名称</th>
                            <th>添加时间</th>
                            <th>状态</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody id="show">
                            <volist name="list" id="data">
                                <tr>
                                    <td>{$data.id}</td>
                                    <td>{$data.pid}</td>
                                    <td>{$data.html}{$data.columns}</td>
                                    <td>{$data.addtime}</td>
                                    <td>
                                        <if condition="($data.status eq 1)">
                                            <a href="javascript:changestatus({$data.id})" id="state{$data.id}" class="label label-primary dim">正常</a>

                                            <else />
                                            <a href="javascript:changestatus({$data.id})" id="state{$data.id}" class="label label-danger  dim ">禁用</a>
                                        </if>
                                    </td>
                                    <td><a href="{:U('columns/add?pid='.$data['id'])}" class="label label-primary dim">添加子栏目</a>&nbsp;&nbsp;<a href="{:U('columns/edit?id='.$data['id'])}" class="label label-primary dim">修改</a>&nbsp;&nbsp;<a href="javascript:delData({$data.id})" class="label label-danger dim ">删除</a></td>
                                </tr>
                            </volist>
                        </tbody>
                    </table>
                    <div id="pages" style="text-align: center"></div>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="__ADMIN__js/jquery.min.js"></script>
<script src="__ADMIN__js/bootstrap.min.js"></script>
<script src="__ADMIN__js/plugins/layer/layer.min.js"></script>
<script src="__ADMIN__js/common.js"></script>
<script src="__ADMIN__js/plugins/layer/laypage/laypage.js"></script>
<script>
//修改状态
function changestatus(id){
    var idstr = '#state'+id;
    var objectState = $(idstr);
    common.status("{:U('columns/changestatus')}",id,objectState);
}
function delData(id){
    common.del("{:U('columns/del')}",id,"{:U('columns/index')}");
}
</script>
</html>
